package com.example.demo.service.impl;

import com.example.demo.dao.NutritionalvalueDao;
import com.example.demo.model.Nutritionalvalue;
import com.example.demo.service.NutritionalValueService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class  NutritionalValueServiceImpl implements NutritionalValueService {
    @Autowired
    private  NutritionalvalueDao nutritionalvalueDao;

    @Override
    public Nutritionalvalue getDishNutritionalValue(String name) {
        return nutritionalvalueDao.findByName(name);
    }

    @Override
    public Nutritionalvalue getIngredientNutritionalValue(String name) {
        return nutritionalvalueDao.findByName(name);
    }
}
